package model

import (
	"fmt"
	"ginBlog/utils"
	"github.com/jinzhu/gorm"
)

var (
	db *gorm.DB
	err error
	)
func InitDb(){
	db,err:=gorm.Open(utils.Db,fmt.Sprintf("%s:%s@tcp(%s:%s)/%s?charset=utf8&parseTime=True"),
		utils.DbUser,
		utils.DbPassWord,
		utils.DbHost,
		utils.HttpPort,
		)
	if err!=nil{

	}
}